package com.dis.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class Permission implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long id;
    private String permissionName;
    private String permissionCode;
    private Integer permissionType; // 1-菜单 2-按钮 3-API
    private Long parentId;
    private String path;
    private String component;
    private String icon;
    private Integer sort;
    private Integer status;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;

    // 子权限列表，用于构建树形结构
    @TableField(exist = false)
    private List<Permission> children;
}
